clear;clc;
load Crs.mat
r=0:5;
d=log(3)/log(2);
rd=r.^d;

%%
figure
box on
hold on
xlabel('r','FontWeight','bold')
ylabel('C(r)','FontWeight','bold')
set(gca,'LineWidth',3)
set(gca,'FontSize',20)

plot(r,Crs(1,:),'-s','LineWidth',3.5,'Color',[0.1010 0.3450 0.9830])
plot(r,Crs(2,:),'-^','LineWidth',3.5,'Color',[0 0.8 0.2])
plot(r,Crs(3,:),'-d','LineWidth',3.5,'Color',[0 0.95 0.75])
plot(r,Crs(4,:),'-v','LineWidth',3.5,'Color','#FFC0CB')
plot(r,Crs(5,:),'-p','LineWidth',3.5,'Color',[0.9290 0.6940 0.1250])
plot(r,Crs(6,:),'-h','LineWidth',3.5,'Color',[0.9500 0.2250 0.0480])

legend('Ω = 1.3V','Ω = 1.2V','Ω = 1.1V','Ω = 0.6V','Ω = 0.4V','Ω = 0.2V','FontWeight','bold','Location','southwest')
set(gcf,'position',[300,100,950,600])

%%
figure
box on
hold on
xlabel('r^d','FontWeight','bold')
ylabel('log C(r)','FontWeight','bold')
xlim([min(r.^d) max(r.^d)])
set(gca,'LineWidth',3)
set(gca,'FontSize',20)

rds=min(rd):.1:max(rd);

a1=0.3191;
a2=0.2272;
a3=0.1858;

plot(r.^d,log(Crs(1,:)),'-s','LineWidth',3.5,'Color',[0.1010 0.3450 0.9830])
plot(rds,-a1*rds,'-.','LineWidth',2,'Color',[0.9290 0.6940 0.1250])
plot(r.^d,log(Crs(2,:)),'-^','LineWidth',3.5,'Color',[0 0.8 0.2])
plot(rds,-a2*rds,'-.','LineWidth',2,'Color',[1 0.1250 1])
plot(r.^d,log(Crs(3,:)),'-d','LineWidth',3.5,'Color',[0 0.95 0.75])
plot(rds,-a3*rds,'-.','LineWidth',2,'Color',[1 0.01 0.05])
legend('Ω = 1.3V data','Ω = 1.3V fit','Ω = 1.2V data','Ω = 1.2V fit','Ω = 1.1V data','Ω = 1.1V fit','FontWeight','bold','Location','southwest')
set(gcf,'position',[300,100,950,600])